<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "single_page".
 *
 * @property integer $single_page_id
 * @property string $title
 * @property string $subtitle
 * @property string $content
 * @property string $update_time
 */
class SinglePage extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'single_page';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['title', 'content'], 'required'],
            [['content'], 'string'],
            [['update_time'], 'safe'],
            [['title', 'subtitle'], 'string', 'max' => 100],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'single_page_id' => '单页ID',
            'title' => '标题',
            'subtitle' => '副标题',
            'content' => '内容',
            'update_time' => '更新时间',
        ];
    }

}
